﻿using ASmile;
using ASmile.Extern.Lib;
using ASmile.Extern.Lib.Rsp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace ExternLib.Test
{
    public class Test001Response : HttpResponseDefault
    {
        public override string Type => CType;

        static string CType { get; } = "test-001";

        protected override ApiResult GetResponseObject(Dictionary<string, string> jsonObj)
        {
            ApiResult result = new ApiResult();
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("请求参数：");
            if (jsonObj != null)
            {
                foreach (var item in jsonObj)
                {
                    sb.AppendLine($"{item.Key} : {item.Value}");
                }
            }

            sb.AppendLine(" -- -- --");
            sb.AppendLine($"当前时间：{DateTime.Now}");

            result.code = 0;
            return result;
        }
    }
}